import './global.scss'
import 'antd/dist/antd.min.css'
import React from 'react'
import {Provider} from 'react-redux'
import { Store, Persistor } from '../store/store'
import Container from '../components/Container'
import PublicComponent from '../components/Public'
import { Provider as BusProvider } from '../hooks/useBus'
import {PersistGate} from 'redux-persist/lib/integration/react';

function App({Component, pageProps}) {
    return <BusProvider>
        <Provider store={Store}>
            <PersistGate loading={null} persistor={Persistor}>
                <Container>
                    <Component {...pageProps} />
                </Container>
                <PublicComponent></PublicComponent>
            </PersistGate>
        </Provider>
    </BusProvider>
}

export default (App)
